-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Support region_configs without dynamic block inside a replication_specs with dynamic blocks #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support region_configs without dynamic block inside a replication_specs with dynamic blocks #82
Conversation
return dynamicBlock{}, nil | ||
} | ||
|
||
repSpecb := hclwrite.NewEmptyFile().Body() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I believe this drops any user comments in the block, is that correct? if yes, that's probably ok for a converter but maybe we should mention in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for region_configs without dynamic blocks inside replication_specs that use dynamic blocks. This enhancement allows mixed usage patterns where replication_specs are generated dynamically but region_configs within them are static. The changes also clarify that some comments and formatting may not be preserved during conversion.
- Refactors conversion logic to handle static region_configs within dynamic replication_specs
- Extracts common functionality into shared helper functions
- Updates documentation to clarify formatting preservation limitations
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/e2e/e2e_helper.go | Adds Atlas CLI storage warning suppression before tests |
internal/convert/testdata/ | Adds test cases demonstrating dynamic replication_specs with static region_configs |
internal/convert/shared.go | Extracts common helper functions for code reuse across converters |
internal/convert/clu2adv.go | Refactors to use shared helpers and handle mixed dynamic/static patterns |
internal/convert/adv2v2.go | Refactors to use shared helpers and handle mixed dynamic/static patterns |
docs/ | Updates documentation to clarify formatting and comment preservation |
Comments suppressed due to low confidence (1)
internal/convert/adv2v2.go:1
- The read_only_specs block is missing from the converted output in the 'multiple_config' resource, but it exists in the input file. This indicates the conversion logic may not be properly handling read_only_specs when processing static region_configs within dynamic replication_specs.
package convert
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
Support region_configs without dynamic block inside a replication_specs with dynamic blocks.
Also:
Link to any related issue(s): CLOUDP-344279
Type of change:
Required Checklist:
Further comments